package cn.com.dhcc.ddi.usermgr.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.dhcc.app.core.exception.DaoException;
import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.app.core.pubmodule.sysmgr.usermgr.vo.UserInfoVo;
import cn.com.dhcc.app.core.service.BaseService;
import cn.com.dhcc.ddi.usermgr.dao.UserInfoDao;
/**
 * 
    * @ClassName: UserInfoService
    * @Description: 用户管理
    * @author dxy
    * @date 2017-3-28
    *
 */
@Service
public class UserInfoService extends BaseService {
	

	@Autowired
	private UserInfoDao userInfoDao;

	
/**
 * 
    * @Title: userNodeMgr
    * @Description: 配置用户节点权限
    * @param @param vo
    * @param @return
    * @param @throws ServiceException    参数
    * @return int    返回类型
    * @throws
 */
		public int update(UserInfoVo user) throws ServiceException {
			
			try {
				return userInfoDao.userNodeConfigure(user);
			}catch (DaoException e)  {
				throw new ServiceException("更新失败", e);
			}
		}
/**
 * 
    * @Title: get
    * @Description: 获取用户
    * @param @param id
    * @param @return
    * @param @throws ServiceException    参数
    * @return UserInfoVo    返回类型
    * @throws
 */
		public UserInfoVo get(String id) throws ServiceException {
			try {
				
			   return userInfoDao.get(id);
			} catch (DaoException e) {
				throw new ServiceException("根据id获取用户名失败", e);
			}
			
		}


}



